<?php
class Test_Abovo_File extends Solar_Test {
    
    public function testApplyCallbackToCsvLine()
    {
        $file = Solar::factory('Abovo_File');
        
        $lines = $file->csvReadLineAssoc(
            dirname(__FILE__) . '/File/csv_data.csv',
            array($this, 'csvCallback'),
            1000,
            "|"
        );
        
        // correct line count?
        $this->assertSame($lines, 29);
    }
    
    public function csvCallback($data)
    {
        $this->assertTrue(is_array($data));
    }
}
